import requeat from '../utils/request'
export function setHeaders(token){
    requeat.interceptors.request.use(
        config => {
            if (token) {
              config.headers.Authorization = token
            } else {
              config.headers.Authorization = null
            }
            return config;
        },
        error => {
            console.log(error);
            return Promise.reject();
        }
    );
}